package com.hejjon.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hejjon.core.domain.entity.FeatureCategory;
import com.hejjon.core.domain.vo.FeatureCategoryVO;

import java.util.List;

/**
 * @author: cs
 * @date: 2025-02-26 16:26:53
 * @since: 1.0
 */
public interface IFeatureCategoryService extends IService<FeatureCategory> {


    /**
     * 新建特征分类
     * @param category
     * @return
     */
    boolean createCategory(FeatureCategory category);


    /**
     * 查询特征分类树形数据
     * @return
     */
    List<FeatureCategoryVO> findTreeData(String kind);

    /**
     * 根据ID删除分类
     * @param id
     * @param kind 类别 basicType, busiAttr
     * @return
     */
    boolean removeById(String id, String kind);


    /**
     * 更新特征分类
     * @param featureCategory
     * @return
     */
    boolean updateCategory(FeatureCategory featureCategory);

    /**
     * 根据分类类型查询
     * @param kind   basic, business, busiAttr
     * @return
     */
    List<FeatureCategory> findByKind(String kind);


    /**
     * 组装树结构数据
     * @param list
     * @return
     */
    List<FeatureCategoryVO> buildTreeData(List<FeatureCategory> list);

}
